package cn.bocweb.spinning.view.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

import cn.bocweb.spinning.model.Bean.StartExamBean;
import cn.bocweb.spinning.view.fragment.ExamQuizFragment;

/**
 * Created by chenchangxing on 15/12/23.
 */
public class TestAdapter extends FragmentPagerAdapter {

    List<StartExamBean.DataEntity> dataEntities;
    ExamQuizFragment examQuizFragment;
    List<ExamQuizFragment> fragments;

    public TestAdapter(FragmentManager fm, List<StartExamBean.DataEntity> dataEntities, List<ExamQuizFragment> fragments) {
        super(fm);
        this.dataEntities = dataEntities;
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return dataEntities.size();
    }

    @Override
    public void notifyDataSetChanged() {
        super.notifyDataSetChanged();
    }
}
